DOCKER_USERNAME=nginx-rtmp-oem
DEV_IMAGE_NAME=registry.cn-hangzhou.aliyuncs.com/slef/$(DOCKER_USERNAME)
DEV_VERSION=20241116004

.PHONY: publish-dev publish-localhost build-dev tag-dev push-dev clean run-dev get-pull-oem run-oem

publish-dev: build-dev tag-dev push-dev
publish-localhost: build-dev tag-dev

build-dev:
	docker buildx build --build-arg ENV=uat -t $(DEV_IMAGE_NAME) .

tag-dev:
	docker tag $(DEV_IMAGE_NAME) $(DEV_IMAGE_NAME):$(DEV_VERSION)

push-dev:
	docker push $(DEV_IMAGE_NAME):$(DEV_VERSION)

run-dev: 
	docker run -p 1935:1935 -p 8000:8000 $(DEV_IMAGE_NAME):$(DEV_VERSION)
get-pull-oem: 
	docker pull registry.cn-hangzhou.aliyuncs.com/slef/airensoft-ovenmediaengine:20241116001
run-oem: 
	docker run -d -p 8090:80 -p 1935:1935 -p 8080:8080 -p 8081:8081 -p 9000:9000 -p 3333:3333 -p 3478:3478 -v ./Server.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml --name ovenmediaengine registry.cn-hangzhou.aliyuncs.com/slef/airensoft-ovenmediaengine:20241116001
run-oem-windos: 
	docker run -d -p 8090:80 -p 1935:1935 -p 8080:8080 -p 8081:8081 -p 9000:9000 -p 3333:3333 -p 3478:3478 -v "E:/work/live/nginx-rtmp-oem/Server.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml" --name ovenmediaengine registry.cn-hangzhou.aliyuncs.com/slef/airensoft-ovenmediaengine:20241116001
run-oem-windos-latest: 
	docker run -d -p 8090:80 -p 1935:1935 -p 8080:8080 -p 8081:8081 -p 9000:9000 -p 3333:3333 -p 3478:3478 -v "E:/work/live/nginx-rtmp-oem/Server.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml" --name ovenmediaengine airensoft/ovenmediaengine:latest